package com.yangbo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @Date 2018-10-15 17:14
 */
@RestController
@RefreshScope
public class HiController {

    @Value("${foo}")
    private String foo;

    @GetMapping(value = "/hi")
    public ResponseEntity hi() {
        return ResponseEntity.ok().body("hi,"+foo);
    }
}
